<template>
  <div id="app">
    <nav>
      <!-- <a href="#/a">去home</a>
      <a href="#/b">去about</a> -->


      <!-- 路由提供的一个组件叫声明式导航 -->
      <router-link to="/a">去home</router-link>
      <router-link to="/b">去about</router-link>
    </nav>

    <!-- 路由出口 -->
    <!-- 路由最终出现的地方 -->
    <router-view />
  </div>
</template>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}

nav {
  padding: 30px;
}

nav a {
  font-weight: bold;
  color: #2c3e50;
}

nav a.router-link-active {
  color: #f00;
}
</style>
